package model

type SendMsgRequest struct {
	SyncOtherMachine int           `json:"SyncOtherMachine"`
	FromAccount      string        `json:"From_Account"`
	ToAccount        string        `json:"To_Account"`
	MsgSeq           int           `json:"MsgSeq"`
	MsgRandom        int           `json:"MsgRandom"`
	MsgBody          []MsgBodyItem `json:"MsgBody"`
	CloudCustomData  string        `json:"CloudCustomData,omitempty"`
	OfflinePushInfo  *OfflinePush  `json:"OfflinePushInfo,omitempty"`
}

type MsgBodyItem struct {
	MsgType    string         `json:"MsgType"`
	MsgContent TextMsgContent `json:"MsgContent"`
}

type TextMsgContent struct {
	Text string `json:"Text"`
}

type OfflinePush struct {
	PushFlag int          `json:"PushFlag"`
	Desc     string       `json:"Desc"`
	Ext      string       `json:"Ext"`
	Android  *AndroidPush `json:"AndroidInfo,omitempty"`
	IOS      *IOSPush     `json:"ApnsInfo,omitempty"`
}

type AndroidPush struct {
	Sound string `json:"Sound"`
}

type IOSPush struct {
	Sound     string `json:"Sound"`
	BadgeMode int    `json:"BadgeMode"`
	Title     string `json:"Title"`
	SubTitle  string `json:"SubTitle"`
	Image     string `json:"Image"`
}

type OnlineStatusRequest struct {
	ToAccount []string `json:"To_Account"`
}
type OnlineStatusResponse struct {
	ActionStatus string        `json:"ActionStatus"`
	ErrorInfo    string        `json:"ErrorInfo"`
	ErrorCode    int           `json:"ErrorCode"`
	QueryResult  []QueryResult `json:"QueryResult"`
}

type QueryResult struct {
	ToAccount string `json:"To_Account"`
	Status    string `json:"Status"`
}
type SendMsgResponse struct {
	ActionStatus string `json:"ActionStatus"`
	ErrorInfo    string `json:"ErrorInfo"`
	ErrorCode    int    `json:"ErrorCode"`
	MsgTime      int    `json:"MsgTime"`
	MsgKey       string `json:"MsgKey"`
	MsgId        string `json:"MsgId"`
}
